#!/usr/bin/env python3
# -*- coding: utf-8 -*-

class MyObjet(object):
    """docstring for MyObjet."""
    def __init__(self):
        self.x = 9
    def power(self):
        return self.x * self.x
obj = MyObjet()
print(hasattr(obj,'x'))
print(hasattr(obj,'y'))
setattr(obj,'y',99)
print(hasattr(obj,'y'))
print(getattr(obj,'x'))
a = getattr(obj,'power')
print(a())
